package LeetCode.month04.day115;

/**
 * @author 16778
 * @date 2025/11/25 14:21
 * @description
 */
public class No1015 {
    static void main() {
        System.out.println(smallestRepunitDivByK(23));
    }
    public static int smallestRepunitDivByK(int k) {
        if(k%2==0||k%5==0) return -1;
        int x = 1;
        int num = 1;
        while(x%k!=0){
            x = x*10%k+1;
            num++;
        }
        return num;
    }
}
